using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using VoteSystem.Model.Models.Mapping;

namespace VoteSystem.Model.Models
{
    public partial class VoteSystemContext : DbContext
    {
        static VoteSystemContext()
        {
            Database.SetInitializer<VoteSystemContext>(null);
        }

        public VoteSystemContext()
            : base("Name=VoteSystemContext")
        {
        }

        public DbSet<T_Competitor> T_Competitor { get; set; }
        public DbSet<T_Present> T_Present { get; set; }
        public DbSet<T_ThumbUpInfo> T_ThumbUpInfo { get; set; }
        public DbSet<T_ThumbUpLog> T_ThumbUpLog { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Configurations.Add(new T_CompetitorMap());
            modelBuilder.Configurations.Add(new T_PresentMap());
            modelBuilder.Configurations.Add(new T_ThumbUpInfoMap());
            modelBuilder.Configurations.Add(new T_ThumbUpLogMap());
        }
    }
}
